package com.dbtimer.dbupdatespring.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 测点原始数据表，不包含效应量，是原始导入数据，未经过处理的数据
 * @author 11092
 * @TableName data_points_original
 */
@TableName(value ="data_points_original")
@Data
public class DataPointsOriginalEntity implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 测点编号
     */
    @TableField(value = "point_index")
    private String pointIndex;

    /**
     * 观测时间
     */
    @TableField(value = "view_time")
    private Date viewTime;

    /**
     * 1号观测量
     */
    @TableField(value = "ob1")
    private Double ob1;

    /**
     * 2号观测量
     */
    @TableField(value = "ob2")
    private Double ob2;

    /**
     * 3号观测量
     */
    @TableField(value = "ob3")
    private Double ob3;

    /**
     * 4号观测量
     */
    @TableField(value = "ob4")
    private Double ob4;

    /**
     * 5号观测量
     */
    @TableField(value = "ob5")
    private Double ob5;

    /**
     * 6号观测量
     */
    @TableField(value = "ob6")
    private Double ob6;

    /**
     * 5号观测量
     */
    @TableField(value = "ob7")
    private Double ob7;

    /**
     * 6号观测量
     */
    @TableField(value = "ob8")
    private Double ob8;

    /**
     * 数据采集方式
     */
    @TableField(value = "way")
    private String way;

    /**
     * 备注信息
     */
    @TableField(value = "remarks")
    private String remarks;

    /**
     * 当前测点数据是否异常，0：正常；1：异常
     */
    @TableField(value = "status")
    private Integer status;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DataPointsOriginalEntity other = (DataPointsOriginalEntity) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPointIndex() == null ? other.getPointIndex() == null : this.getPointIndex().equals(other.getPointIndex()))
            && (this.getViewTime() == null ? other.getViewTime() == null : this.getViewTime().equals(other.getViewTime()))
            && (this.getOb1() == null ? other.getOb1() == null : this.getOb1().equals(other.getOb1()))
            && (this.getOb2() == null ? other.getOb2() == null : this.getOb2().equals(other.getOb2()))
            && (this.getOb3() == null ? other.getOb3() == null : this.getOb3().equals(other.getOb3()))
            && (this.getOb4() == null ? other.getOb4() == null : this.getOb4().equals(other.getOb4()))
            && (this.getOb5() == null ? other.getOb5() == null : this.getOb5().equals(other.getOb5()))
            && (this.getOb6() == null ? other.getOb6() == null : this.getOb6().equals(other.getOb6()))
            && (this.getOb7() == null ? other.getOb7() == null : this.getOb7().equals(other.getOb7()))
            && (this.getOb8() == null ? other.getOb8() == null : this.getOb8().equals(other.getOb8()))
            && (this.getWay() == null ? other.getWay() == null : this.getWay().equals(other.getWay()))
            && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPointIndex() == null) ? 0 : getPointIndex().hashCode());
        result = prime * result + ((getViewTime() == null) ? 0 : getViewTime().hashCode());
        result = prime * result + ((getOb1() == null) ? 0 : getOb1().hashCode());
        result = prime * result + ((getOb2() == null) ? 0 : getOb2().hashCode());
        result = prime * result + ((getOb3() == null) ? 0 : getOb3().hashCode());
        result = prime * result + ((getOb4() == null) ? 0 : getOb4().hashCode());
        result = prime * result + ((getOb5() == null) ? 0 : getOb5().hashCode());
        result = prime * result + ((getOb6() == null) ? 0 : getOb6().hashCode());
        result = prime * result + ((getOb7() == null) ? 0 : getOb7().hashCode());
        result = prime * result + ((getOb8() == null) ? 0 : getOb8().hashCode());
        result = prime * result + ((getWay() == null) ? 0 : getWay().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", pointIndex=").append(pointIndex);
        sb.append(", viewTime=").append(viewTime);
        sb.append(", ob1=").append(ob1);
        sb.append(", ob2=").append(ob2);
        sb.append(", ob3=").append(ob3);
        sb.append(", ob4=").append(ob4);
        sb.append(", ob5=").append(ob5);
        sb.append(", ob6=").append(ob6);
        sb.append(", ob7=").append(ob7);
        sb.append(", ob8=").append(ob8);
        sb.append(", way=").append(way);
        sb.append(", remarks=").append(remarks);
        sb.append(", status=").append(status);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}